package com.xxg.renrenproduct.dao;

import com.xxg.renrencommon.domain.dao.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

/**
 * RenrenShopGoodsCategoryDao继承基类
 */
@Repository
@Mapper
public interface RenrenShopGoodsCategoryDao extends BaseMapper<RenrenShopGoodsCategory, Integer> {

    @Select("SELECT id FROM renren_shop_goods_category WHERE shop_id = #{shopId, jdbcType=INTEGER} AND name = #{name, jdbcType=VARCHAR} AND parent_id = #{parentId, jdbcType=INTEGER}")
    Integer selectIdByShopIdAndName(@Param("shopId") Integer shopId, @Param("name") String name, @Param("parentId") Integer parentId);
}